package com.yulinlin.admin.core.domain.vo;

import java.util.List;

public class PageVo<E> {

    private List<E> list;

    private long total;

    public PageVo() {

    }

    public PageVo(List<E> list, long total) {
        this.list = list;
        this.total = total;
    }

    public List<E> getList() {
        return list;
    }



    public long getTotal() {
        return total;
    }



    public static <E> PageVo<E> newInstance(List<E> list){
        return  new PageVo<>(list,list.size());
    }

    public static <E> PageVo<E> newInstance(List<E> list,long total){
        return  new PageVo<>(list,total);
    }

}


